package com.proyecto.spv.client.view;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;

public class BuscarTrabajadorView extends Composite {

	public BuscarTrabajadorView() {
		
		VerticalPanel verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		
		DecoratorPanel decoratorPanel = new DecoratorPanel();
		verticalPanel.add(decoratorPanel);
		decoratorPanel.setSize("442px", "102px");
		
		FlexTable flexTable = new FlexTable();
		decoratorPanel.setWidget(flexTable);
		flexTable.setWidth("427px");
		
		Label lblDni = new Label("DNI:");
		flexTable.setWidget(0, 0, lblDni);
		
		TextBox textBox = new TextBox();
		flexTable.setWidget(0, 1, textBox);
		textBox.setWidth("215px");
		
		Label lblApellidoPaterno = new Label("Apellido Paterno:");
		flexTable.setWidget(1, 0, lblApellidoPaterno);
		lblApellidoPaterno.setWidth("135px");
		
		TextBox textBox_1 = new TextBox();
		flexTable.setWidget(1, 1, textBox_1);
		textBox_1.setWidth("221px");
		flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		flexTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE);
		flexTable.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		flexTable.getCellFormatter().setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_MIDDLE);
		
		Label lblApellidoMaterno = new Label("Apellido Materno:");
		flexTable.setWidget(2, 0, lblApellidoMaterno);
		lblApellidoMaterno.setWidth("135px");
		
		TextBox textBox_2 = new TextBox();
		flexTable.setWidget(2, 1, textBox_2);
		textBox_2.setWidth("232px");
		flexTable.getCellFormatter().setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		
		Label lblNombres = new Label("Nombres:");
		flexTable.setWidget(3, 0, lblNombres);
		lblNombres.setWidth("135px");
		
		TextBox textBox_3 = new TextBox();
		flexTable.setWidget(3, 1, textBox_3);
		textBox_3.setWidth("220px");
		
		Button button = new Button("Buscar");
		flexTable.setWidget(4, 0, button);
		
		Button button_1 = new Button("Limpiar");
		flexTable.setWidget(4, 1, button_1);
		flexTable.getCellFormatter().setHorizontalAlignment(3, 0, HasHorizontalAlignment.ALIGN_RIGHT);
		flexTable.getCellFormatter().setVerticalAlignment(3, 0, HasVerticalAlignment.ALIGN_MIDDLE);
		flexTable.getCellFormatter().setHorizontalAlignment(4, 0, HasHorizontalAlignment.ALIGN_CENTER);
		flexTable.getCellFormatter().setVerticalAlignment(4, 0, HasVerticalAlignment.ALIGN_MIDDLE);
		
		ScrollPanel scrollPanel = new ScrollPanel();
		verticalPanel.add(scrollPanel);
		scrollPanel.setHeight("72px");
		
		FlexTable flexTable_1 = new FlexTable();
		flexTable_1.setText(0,0,"DNI");
		flexTable_1.setText(0,1,"Apellido Paterno");
		flexTable_1.setText(0,2,"Apellido Materno");
		flexTable_1.setText(0,3,"Nombres");
		scrollPanel.setWidget(flexTable_1);
		flexTable_1.setSize("100%", "65px");
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		horizontalPanel.setSpacing(10);
		verticalPanel.add(horizontalPanel);
		verticalPanel.setCellHorizontalAlignment(horizontalPanel, HasHorizontalAlignment.ALIGN_CENTER);
		horizontalPanel.setWidth("353px");
		
		Button button_2 = new Button("Seleccionar");
		horizontalPanel.add(button_2);
		
		Button button_3 = new Button("Nueva Busqueda");
		horizontalPanel.add(button_3);
	}

}
